/**
 * Created by chenqian on 2017/12/28.
 */
import {
	createStore,
	applyMiddleware
} from 'redux';

import thunkMiddleware from 'redux-thunk'
import reducers from '../reducers'

const createStoreWithMiddleware = applyMiddleware(
	thunkMiddleware, // 允许我们 dispatch() 函数
)(createStore)

export default function configStore(initState) {
	return createStoreWithMiddleware(reducers,initState||{});
}